package com.zerdoor.dao;


import java.util.Map;

/**
 * Created by xiaoji on 2015/2/13.
 */
public interface PayDao {
    /**
     * 获取支付配置信息
     */
    public Map<String,Object> getAlipayConfig(int configId);

    /**
     * 根据编号查询充值记录表
     * @param walletId
     * @return
     */
    public Map<String,Object> getUserWalletByWalletId(int walletId);

    /**
     * 充值前初始化查询记录
     * @param map
     * @throws Exception
     */
    public void addUserWallet(Map<String, Object> map) throws Exception;

    /**
     * 充值成功后调用
     * @param map
     * @throws Exception
     */
    public void updateUserWalletSuccess(Map<String, Object> map) throws Exception;

    /**
     * 充值失败后调用
     * @param map
     * @throws Exception
     */
    public void updateUserWalletFail(Map<String, Object> map) throws Exception;

    /**
     * 充值成功加入钱包
     * @param map
     * @throws Exception
     */
    public void updateWallet(Map<String, Object> map) throws Exception;

    /**
     * 获取用户钱包余额
     * @param userId
     * @return
     */
    public Map<String,Object> getUserWallet(int userId);

}
